package cn.nawang.ebeim.persist.domain;

import cn.nawang.ebeim.persist.annotation.Column;
import cn.nawang.ebeim.persist.annotation.Table;

import java.util.Date;

/**
 * Created by GanJc on 2015-12-08 14:19
 */
@Table("data_source")
public class DataSource {

    @Column("id")
    private Integer id ;

    @Column("dsId")
    private String dsId ;

    @Column("root_path")
    private String rootPath ;

    @Column("abs_path")
    private String absPath ;

    @Column("total_dir")
    private Integer totalDir ;

    @Column("total_file")
    private Integer totalFile ;

    @Column("create_time")
    private Long createTime ;

    public DataSource() {
    }

    public DataSource(String dsId,String rootPath, String absPath, Integer totalDir, Integer totalFile) {
        this.dsId = dsId;
        this.rootPath = rootPath;
        this.absPath = absPath;
        this.totalDir = totalDir;
        this.totalFile = totalFile;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getRootPath() {
        return rootPath;
    }

    public void setRootPath(String rootPath) {
        this.rootPath = rootPath;
    }

    public String getAbsPath() {
        return absPath;
    }

    public void setAbsPath(String absPath) {
        this.absPath = absPath;
    }

    public Integer getTotalDir() {
        return totalDir;
    }

    public void setTotalDir(Integer totalDir) {
        this.totalDir = totalDir;
    }

    public Integer getTotalFile() {
        return totalFile;
    }

    public void setTotalFile(Integer totalFile) {
        this.totalFile = totalFile;
    }

    public String getDsId() {
        return dsId;
    }

    public void setDsId(String dsId) {
        this.dsId = dsId;
    }

    public Date getCreateTime() {
        return new Date(createTime);
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "DataSource{" +
                "id=" + id +
                ", dsId='" + dsId + '\'' +
                ", rootPath='" + rootPath + '\'' +
                ", absPath='" + absPath + '\'' +
                ", totalDir=" + totalDir +
                ", totalFile=" + totalFile +
                '}';
    }
}
